﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Wix.Aura.Common;
using Wix.Aura.UnitTests.Tools;
using Wix.Aura.Common.CustomTypes;

namespace Wix.Aura.UnitTests.Common {
	[TestFixture]
	public class MimeSerialization {

		[Test]
		public void EmptyMime() {
			Mime mime = new Mime("mimeType");
			XmlAssert.AreEqual(@"<MIME ContentType=""mimeType"" />", mime);
		}

		[Test]
		public void AllAttributes() {
			Mime mime = new Mime("contentType");
			mime.Advertise = YesNoType.Yes;
			mime.Class = Guid.Empty;
			mime.Default = YesNoType.Yes;
			XmlAssert.AreEqual(@"<MIME ContentType=""contentType"" Advertise=""yes"" Class=""00000000-0000-0000-0000-000000000000"" Default=""yes"" />", mime);
		}
	}
}
